package com.itheima.book.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.itheima.book.pojo.entity.Favorite;

public interface FavoriteService extends IService<Favorite> {
    /**
     * 检查用户是否收藏了某本书
     * @param userId 用户ID
     * @param bookId 书籍ID
     * @return 是否收藏
     */
    boolean isFavorite(Long userId, Long bookId);

    /**
     * 添加收藏
     * @param userId 用户ID
     * @param bookId 书籍ID
     */
    void addFavorite(Long userId, Long bookId);

    /**
     * 取消收藏
     * @param userId 用户ID
     * @param bookId 书籍ID
     */
    void removeFavorite(Long userId, Long bookId);
} 